<!DOCTYPE html>
<html lang="en">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>酒店管理系统</title>
    </head>



    <script src="./js/vue.js"></script>
    <script src="./js/axios-0.18.0.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="./css/Element-Ui.css">
    <!-- 引入组件库 -->
    <script src="./js/Element-Ui.js"></script>
    <script src="assets/js/jQuery-3.3.1.js"></script>


    <!-- Bootstrap core CSS -->
    <link href="assets/css/bootstrap.css" rel="stylesheet">
    <!--external css-->
    <link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" />

    <!-- Custom styles for this template -->
    <link href="assets/css/style.css" rel="stylesheet">
    <link href="assets/css/style-responsive.css" rel="stylesheet">
    <link href="assets/css/Element-Ui.css" rel="stylesheet">

    <script src="assets/js/chart-master/Chart.js"></script>
    <script src="assets/js/chart-master/J"></script>

    <body>
        <div id="app">
            <section id="container">
                <!-- **********************************************************************************************************************************************************
        TOP BAR CONTENT & NOTIFICATIONS
        *********************************************************************************************************************************************************** -->
                <!--header start-->
                <header class="header black-bg">
                    <div class="sidebar-toggle-box">
                        <div class="fa fa-bars tooltips" data-placement="right" data-original-title="Toggle Navigation">
                        </div>
                    </div>
                    <!--logo start-->
                    <a href="index.jsp" class="logo"><b>DASHGUM FREE</b></a>
                    <!--logo end-->
                    <div class="nav notify-row" id="top_menu">
                        <!--  notification start -->
                        <ul class="nav top-menu">
                            <!-- settings start -->
                            <li class="dropdown">
                                <a data-toggle="dropdown" class="dropdown-toggle" href="index.jsp#">
                                    <i class="fa fa-tasks"></i>
                                    <span class="badge bg-theme">4</span>
                                </a>
                                <ul class="dropdown-menu extended tasks-bar">
                                    <div class="notify-arrow notify-arrow-green"></div>
                                    <li>
                                        <p class="green">You have 4 pending tasks</p>
                                    </li>
                                    <li>
                                        <a href="index.jsp#">
                                            <div class="task-info">
                                                <div class="desc">DashGum Admin Panel</div>
                                                <div class="percent">40%</div>
                                            </div>
                                            <div class="progress progress-striped">
                                                <div class="progress-bar progress-bar-success" role="progressbar"
                                                    aria-valuenow="40" aria-valuemin="0" aria-valuemax="100"
                                                    style="width: 40%">
                                                    <span class="sr-only">40% Complete (success)</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="index.jsp#">
                                            <div class="task-info">
                                                <div class="desc">Database Update</div>
                                                <div class="percent">60%</div>
                                            </div>
                                            <div class="progress progress-striped">
                                                <div class="progress-bar progress-bar-warning" role="progressbar"
                                                    aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"
                                                    style="width: 60%">
                                                    <span class="sr-only">60% Complete (warning)</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="index.jsp#">
                                            <div class="task-info">
                                                <div class="desc">Product Development</div>
                                                <div class="percent">80%</div>
                                            </div>
                                            <div class="progress progress-striped">
                                                <div class="progress-bar progress-bar-info" role="progressbar"
                                                    aria-valuenow="80" aria-valuemin="0" aria-valuemax="100"
                                                    style="width: 80%">
                                                    <span class="sr-only">80% Complete</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="index.jsp#">
                                            <div class="task-info">
                                                <div class="desc">Payments Sent</div>
                                                <div class="percent">70%</div>
                                            </div>
                                            <div class="progress progress-striped">
                                                <div class="progress-bar progress-bar-danger" role="progressbar"
                                                    aria-valuenow="70" aria-valuemin="0" aria-valuemax="100"
                                                    style="width: 70%">
                                                    <span class="sr-only">70% Complete (Important)</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    <li class="external">
                                        <a href="#">See All Tasks</a>
                                    </li>
                                </ul>
                            </li>
                            <!-- settings end -->
                            <!-- inbox dropdown start-->
                            <li id="header_inbox_bar" class="dropdown">
                                <a data-toggle="dropdown" class="dropdown-toggle" href="index.jsp#">
                                    <i class="fa fa-envelope-o"></i>
                                    <span class="badge bg-theme">5</span>
                                </a>
                                <ul class="dropdown-menu extended inbox">
                                    <div class="notify-arrow notify-arrow-green"></div>
                                    <li>
                                        <p class="green">You have 5 new messages</p>
                                    </li>
                                    <li>
                                        <a href="index.jsp#">
                                            <span class="photo"><img alt="avatar" src="assets/img/ui-zac.jpg"></span>
                                            <span class="subject">
                                                <span class="from">Zac Snider</span>
                                                <span class="time">Just now</span>
                                            </span>
                                            <span class="message">
                                                Hi mate, how is everything?
                                            </span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="index.jsp#">
                                            <span class="photo"><img alt="avatar" src="assets/img/ui-divya.jpg"></span>
                                            <span class="subject">
                                                <span class="from">Divya Manian</span>
                                                <span class="time">40 mins.</span>
                                            </span>
                                            <span class="message">
                                                Hi, I need your help with this.
                                            </span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="index.html#">
                                            <span class="photo"><img alt="avatar" src="assets/img/ui-danro.jpg"></span>
                                            <span class="subject">
                                                <span class="from">Dan Rogers</span>
                                                <span class="time">2 hrs.</span>
                                            </span>
                                            <span class="message">
                                                Love your new .
                                            </span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="index.jsp#">
                                            <span class="photo"><img alt="avatar"
                                                    src="assets/img/ui-sherman.jpg"></span>
                                            <span class="subject">
                                                <span class="from">Dj Sherman</span>
                                                <span class="time">4 hrs.</span>
                                            </span>
                                            <span class="message">
                                                Please, answer asap.
                                            </span>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="index.html#">See all messages</a>
                                    </li>
                                </ul>
                            </li>
                            <!-- inbox dropdown end -->
                        </ul>
                        <!--  notification end -->
                    </div>
                    <div class="top-menu">
                        <ul class="nav pull-right top-menu">
                            <li><a class="logout" href="login.html">Logout</a></li>
                        </ul>
                    </div>
                </header>
                <!--header end-->

                <!-- **********************************************************************************************************************************************************
        MAIN SIDEBAR MENU
        *********************************************************************************************************************************************************** -->
                <!--sidebar start-->
                <aside>
                    <div id="sidebar" class="nav-collapse ">
                        <!-- sidebar menu start-->
                        <ul class="sidebar-menu" id="nav-accordion">

                            <p class="centered"><a href="profile.html"><img src="assets/img/ui-sam.jpg"
                                        class="img-circle" width="60"></a>
                            </p>
                            <h5 class="centered">Marcel Newman</h5>

                            <li class="mt">
                                <a href="index.html">
                                    <i class="fa fa-"></i>
                                    <span></span>
                                </a>
                            </li>

                            <li class="sub-menu">
                                <a href="javascript:;">
                                    <i class="fa fa-desktop"></i>
                                    <span>员工管理</span>
                                </a>
                                <ul class="sub">
                                    <li><a href="panels.html">员工列表</a></li>
                                    <li><a href="general.html">添加员工</a></li>
                                    <li><a href="buttons.html">修改员工信息</a></li>
                                </ul>
                            </li>

                            <li class="sub-menu">
                                <a href="javascript:;">
                                    <i class="fa fa-cogs"></i>
                                    <span>公告</span>
                                </a>
                                <ul class="sub">
                                    <li><a href="basic_table.html">公告列表</a></li>
                                    <li><a href="calendar.html">添加公告</a></li>
                                    <li><a href="gallery.html">修改公告内容</a></li>

                                </ul>
                            </li>
                            <li class="sub-menu">
                                <a href="javascript:;">
                                    <i class="fa fa-book"></i>
                                    <span>日程</span>
                                </a>
                                <ul class="sub">
                                    <li><a href="lock_screen.html">日程列表</a></li>
                                    <li><a href="blank.html">添加日程</a></li>
                                    <li><a href="login.html">修改日程信息</a></li>
                                </ul>
                            </li>

                        </ul>
                        <!-- sidebar menu end-->
                    </div>
                </aside>
                <!--sidebar end-->

                <!-- **********************************************************************************************************************************************************
        MAIN CONTENT
        *********************************************************************************************************************************************************** -->
                <!--main content start-->
                <section id="main-content">
                    <section class="wrapper site-min-height">
                        <table class="table-4" style="width: 1100px;height: 400px;border: 1px solid black">
                            <thead>
                                <tr>
                                    <td>名称</td>
                                    <td>电话</td>
                                    <td>邮箱</td>
                                    <td>是否在岗</td>
                                    <td>薪资</td>
                                    <td>密码</td>
                                    <td colspan="2">操作</td>
                                </tr>
                            </thead>
                            <tbody>

                                <tr v-for="(item,index) in works" :title="item">
                                    <td>{{item.name}}</td>
                                    <td>{{item.phone}}</td>
                                    <td>{{item.email}}</td>
                                    <td>{{item.post==1?"在岗":"不在岗"}}</td>
                                    <td>{{item.money}}</td>
                                    <td>{{item.password}}</td>
                                    <td @click="handleDelete(item.id)">删除</td>

                                    <td @click="handleDelete(item.id)">修改</td>
                                </tr>
                            </tbody>

                        </table>

                    </section>
                    <! --/wrapper -->
                </section><!-- /MAIN CONTENT -->

                <!--main content end-->
                <!--footer start-->

                <!--footer end-->
            </section>
        </div>
    </body>

    <script src="assets/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="assets/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="assets/js/jquery.scrollTo.min.js"></script>

    <script src="assets/js/jquery.nicescroll.js" type="text/javascript"></script>
    <script src="assets/js/jquery.sparkline.js"></script>


    <!--common script for all pages-->
    <script src="assets/js/common-scripts.js"></script>

    <!--script for this page-->
    <script src="assets/js/sparkline-chart.js"></script>
    <script>
        new Vue({
            el: '#app',
            data: {
                works: null

            },
            mounted() {  // 页面加载完成后执行
                this.work();
            },
            methods: {  //方法存放
                work() {
                    axios.get('http://localhost:8099/panels')
                        .then(response => {
                            this.works = response.data;
                        })
                        .catch(function (error) {    //请求失败处理
                            console.log(error);
                        });
                }

            }
        })
    </script>

</html>
